"use client"
import React, { useEffect } from "react";



export default function ErrorPage({ error, reset }: { error: Error & { digest?: string }, reset: () => void }) {
    useEffect(() => {
        // 可以将错误上报给日志服务
        console.error(error);
    }, [error]);
    return (
        <div>
            <h2>出错了！</h2>
            <button onClick={() => reset()}>再试一次</button>
        </div>
    )
}